<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel common\models\search\NewsSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '新闻中心-锐锋堂刀剑网';
$this->registerCssFile('/css/base1.css');
$this->registerCssFile('/css/article.css');
$this->registerCssFile('/css/style2.css');
$this->registerJsFile('/js/slide.js');
$this->registerJs("new dslide('slide_621');");
?>
	<div class="m">
		<div class="m_l f_l">
			<table cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td valign="top" width="300">
						<div id="slide_621" class="slide"
							style="width: 300px; height: 200px;">
							<?php if(!empty($new)):?>
							<?php foreach($new as $key=>$val):?>
							<a href="/news/view-<?=$val['id']?>.html" target="_blank"><img
								src="<?=$val['logo']?>"
								width="300" height="200" alt="<?=$val['title']?>" /></a> 
							
							<?php if($key==2){break;}?>
							<?php endforeach;?>
							<?php endif;?>
						</div>
					</td>
					<td width="10" rowspan="2"></td>
					<td valign="top" class="news_com" rowspan="2">
						<div class="b5"></div>
						<div class="subline">
						<?php if(!empty($new)):?>
						<?php foreach($new as $val):?>
							<li><i></i><a target="_blank" href="/news/view-<?=$val['id']?>.html"
								title="<?=$val['title']?>"><?=$val['title']?></a> <time>(<?=date('m-d',$val['createtime'])?>)</time>
							</li>
						<?php endforeach;?>
						<?php endif;?>	
						</div>
					</td>
				</tr>
			</table>
			<div class="c_b b10"></div>
			<table cellpadding="0" cellspacing="0" width="100%">
			
				<?php if(!empty($column)):?>
				<?php foreach($column as $key=>$val):?>
				<?php if(($key%2)==0):?></tr><tr><?php endif;?>
					<td valign="top" width="350">
						<div class="b10"></div>
						<div class="box_head">
							<span class="f_r"><a href="/news/list-<?=$val['id']?>.html">更多..</a></span><strong><?=$val['name']?></strong>
						</div>
						<div class="box_body li_dot f_gray">
						<?php if(!empty($data[$val['id']])):?>
						<?php foreach($data[$val['id']] as $k=>$v):?>
						<?php if($k==0):?>
							<div class="art_com">
								<img
									src="<?=$v['logo']?>" />
								<span><a href="/news/view-<?=$v['id']?>.html"><?=$v['title']?></a></span>
								<dd>
									<?=mb_strimwidth(strip_tags($v['message']), 0, 60, '...','utf8')?>[<a
										href="/news/view-<?=$v['id']?>.html" target="_blank">详细</a>]
								</dd>
							</div>
						<?php else:?>
							<li><i></i><a target="_blank" href="/news/view-<?=$v['id']?>.html"
								title="<?=$v['title']?>"><?=$v['title']?></a> <time>(<?=date('m-d',$val['createtime'])?>)</time>
							</li>
						<?php endif;?>
						<?php endforeach;?>
						<?php endif;?>
						</div>
					</td>
					<?php if(($key%2)==0):?><td>&nbsp;</td><?php endif;?>
				<?php endforeach;?>
				<?php endif;?>
			</table>
		</div>
		<div class="m_n f_l">&nbsp;</div>
		<div class="m_r f_l">
			<div class="box_head_1">
				<div>
					<span class="f_r"></span><strong>新闻热点</strong>
				</div>
			</div>
			<div class="box_body">
			<?php if(!empty($hot)):?>
				<div class="thumb">
					<table width="100%">
						<tr align="center">
            			<?php foreach($hot as $key=>$val):?>
							<td width="50%" valign="top"><a href="/news/view-<?=$val['id']?>.html"
								target="_blank"><img
									src="<?=$val['logo']?>"
									width="130" height="90" alt="<?=$val['title']?>" /></a>
								<ul>
									<li><a href="/news/view-<?=$val['id']?>.html"
										title="<?=$val['title']?>" target="_blank"><?=$val['title']?></a></li>
								</ul></td>
						<?php if($key==1){break;}?>
						<?php endforeach;?>
						</tr>
					</table>
				</div>
				<div class="f_gray li_dot"
					style="border-top: #C0C0C0 1px dotted; padding: 5px 5px 0 5px;">
					<?php foreach($new as $val):?>
					<li><i></i><a target="_blank" href="/news/view-<?=$val['id']?>.html"
						title="<?=$val['title']?>"><?=$val['title']?></a> <time>(<?=date('m-d',$val['createtime'])?>)</time>
					</li>
					<?php endforeach;?>
				</div>
			<?php endif;?>
			</div>
		</div>
	</div>
